import { instance, request } from "./request";

//获取公司信息接口
export const getCompanyInfo = () => {
  return instance({
    url: "/company/getCompany",
    method: "get",
  });
};

//获取结算周期
export const getSettlementType = () => {
  return request({
    url: "/index/settlementType",
    method: "get",
  });
};

export const getMembe = () => {
  return instance({
    url: "/membe/getMembe",
    method: "get",
  });
};
export const getSSQ = (url) => {
  return instance({
    url: url,
    method: "get",
  });
};
//编辑主用户信息
export const updateMembe = (data) => {
  return instance({
    url: "/membe/update",
    method: "post",
    data: data,
  });
};

//获取子账号列表
export const getChild = (data) => {
  return instance({
    url: "/membe/getChild",
    method: "post",
    data,
  });
};

//编辑子账号信息
export const updateMembeChild = (data) => {
  return instance({
    url: "/membe/updateChild",
    method: "post",
    data: data,
  });
};
//新增子账号
export const addChild = (data) => {
  return instance({
    url: "/membe/addChild",
    method: "post",
    data: data,
  });
};

//删除子账号
export const delChild = (data) => {
  return instance({
    url: "/membe/delChild",
    method: "post",
    data: data,
  });
};

// instance改request 改为api接口里的
export const uploadImage = (data) => {
  return request({
    url: "/Index/upload",
    method: "post",
    data: data,
  });
};

//修改公司信息
export const updateCompany = (data) => {
  return instance({
    url: "/company/updateCompany",
    method: "post",
    data: data,
  });
};

//获取子账号
export const getAccount = (data) => {
  return instance({
    url: "/membe/getAccount",
    method: "post",
    data: data,
  });
};
